<?php

class Rule_Required extends Rule_Abstract
{

	public $_config = array('msg' => 'This field is required');

	public function isValid($value, $params = null)
	{
		return !($value == null || $value == array() || $value == '' ||  $value && is_scalar($value) && trim($value) == '');
	}

}
